package com.cskaoyan.service;

import com.cskaoyan.bean.BaseData;
import com.cskaoyan.bean.bo.CreateGoodsBO;
import com.cskaoyan.bean.bo.GoodsParam;
import com.cskaoyan.bean.pojo.MallGoods;
import com.cskaoyan.bean.vo.CatAndBrandVO;
import com.cskaoyan.bean.vo.FirstCategoryVO;
import com.cskaoyan.bean.vo.GoodsDetailVO;

import java.util.List;

/**
 * @author: harveyliu
 * @description: 商品的service层接口
 * @time: 2021/7/8 20:51
 */
public interface GoodsService {
    /**
     * @Author harvey
     * @description: 用来查询商品列表，有分页的要求，还有可以根据编号和商品名称的模糊查询
     * @Date  2021/7/8 21:10
     * url: http://localhost:8083/admin/goods/list?page=1&limit=20&sort=add_time&order=desc
     */
    BaseData<MallGoods> queryUserByConditions(GoodsParam param);

    /**
     * @Author harvey
     * @description: 用来查找所有的商品分类
     * @Date 2021/7/8 22:41
     * url: http://localhost:8083/admin/goods/catAndBrand
     */
    CatAndBrandVO queryAllCategory();

    /**
     * @Author harvey
     * @description: 通过商品的id来得到商品的详情
     * @Date 2021/7/9 8:36
     * url:http://182.92.235.201:8083/admin/goods/detail?id=1181012
     */
    GoodsDetailVO queryGoodsDetailByGoodsId(Integer id);

    /**
     * @Author harvey
     * @description: 用来实现添加商品的操作
     * @Date 2021/7/9 16:46
     * url: http://182.92.235.201:8083/admin/goods/create
     */
    Integer insertGoods(CreateGoodsBO createGoodsBO);


    /**
     * @Author harvey
     * @description: 实现更新商品的操作
     * @Date 2021/7/9 17:30
     * url: http://182.92.235.201:8083/admin/goods/update
     */
    void updateGoodsById(CreateGoodsBO createGoodsBO);

    /**
     * @Author harvey
     * @description: 实现删除商品的操作
     * @Date 2021/7/9 19:45
     * url: http://182.92.235.201:8083/admin/goods/delete
     */
    void deleteGoodsById(Integer id);
}













